package cn.com.lms.business.emprev.service;

import cn.com.lms.business.emprev.persistence.entity.EmpRecordMaintenance;
import cn.com.lms.business.emprev.persistence.repository.EmpRecordMaintenanceRepository;


import com.bnzj.core.persistence.BaseService;
import com.bnzj.core.persistence.query.QueryHelpBean;
import org.springframework.stereotype.Service;

/**
 * @Author: 16266
 * @DateTime: 2020/3/18 13:45
 * @Description: 备案维护业务层
 */
@Service
public class EmpRecordMaintenanceService extends BaseService<EmpRecordMaintenanceRepository, EmpRecordMaintenance, Long> {

    /**
     *根据员工ID查询员工信息
     * @param account
     * @return
     */
    public EmpRecordMaintenance findByAccount(String account) {
        return repository.findByAccount(account);
    }

    /**
     * 条件构造
     * @return
     */
    public QueryHelpBean getQueryHelpBean() {
        String selectSQL = "select  d.* ";
        String whereSQL = " from bnz_sys_user d where 1=1 ";
        QueryHelpBean queryBean = new QueryHelpBean(selectSQL + whereSQL, "select count(1)" + whereSQL, EmpRecordMaintenance.class);
        return queryBean;
    }


}
